-
Notifications
You must be signed in to change notification settings - Fork 648
Simplify settings package and a few more classes using DI #6778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
Coverage Report 1Affected Products
Test Logs |
Test Results 38 files - 994 38 suites - 994 55s ⏱️ - 33m 27s Results for commit 617945b. ± Comparison against base commit 76990d9. This pull request removes 5768 tests.♻️ This comment has been updated with latest results. |
Size Report 1Affected Products
Test Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's verify with the release plan before merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - but there's still some RemoteSettingsTest and SessionSettingsTest failing which we should probably fix.
Simplify settings package and a few more classes using DI. The biggest example is `SessionsSettings`, which used to have multiple secondary constructors. This change lets us avoid plumbing dependencies like `DataStore<>` through multiple classes. Moved DataStore construction into provides, which will be needed for `MultiProcessDataStoreFactory`. Also cleaned up tests a bit. We shouldn't use Dagger in the unit tests on Android. Once we remove the bound service, it will be easy to remove DI from the unit tests. Instead, unit tests will just call the constructors directly and pass in real or fake instances.
Simplify settings package and a few more classes using DI.
The biggest example is
SessionsSettings, which used to have multiple secondary constructors. Thischange lets us avoid plumbing dependencies like
DataStore<>through multiple classes.Moved DataStore construction into provides, which will be needed for
MultiProcessDataStoreFactory.Also cleaned up tests a bit. We shouldn't use Dagger in the unit tests on Android. Once we remove
the bound service, it will be easy to remove DI from the unit tests. Instead, unit tests will just
call the constructors directly and pass in real or fake instances.